package com.sskj.run.bean;

import android.support.v4.content.ContextCompat;

import com.sskj.common.base.App;
import com.sskj.lib.util.CommonUtil;
import com.sskj.run.R;

/**
 * Created by QinKang on 2018/12/29.
 */

public class BillRecordBean {


    /**
     * ymoney : 0.000000
     * money : 2.000000
     * nmoney : 2.000000
     */

    private String ymoney;//原金额
    private String money;//变动金额
    private String nmoney;//现有金额
    private String mark;
    private String created_at;

    public int getColor() {
        if (money.startsWith("-")) {
            return ContextCompat.getColor(App.INSTANCE, R.color.run_ff5);
        } else {
            return ContextCompat.getColor(App.INSTANCE, R.color.run_32b);
        }
    }

    public String getMark() {
        if (money.startsWith("-")) {
            return App.INSTANCE.getString(R.string.run_billRecordBean1);
        } else {
            return App.INSTANCE.getString(R.string.run_billRecordBean2);
        }
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public String getCreated_at() {
        return created_at;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }

    public String getYmoney() {
        return ymoney;
    }

    public void setYmoney(String ymoney) {
        this.ymoney = ymoney;
    }

    public String getMoney() {
        return CommonUtil.dealPlus(CommonUtil.dealRunMoney(money));
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getNmoney() {
        return CommonUtil.dealRunMoney(nmoney);
    }

    public void setNmoney(String nmoney) {
        this.nmoney = nmoney;
    }
}
